﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmsVotes.DataAccess
{
    /// <summary>
    /// Менеджер ответов
    /// </summary>
    public class AnswerManager : BaseManager
    {


        public static Answer GetByID(int answerID)
        {
            return (from item in EFContext.Answers where item.ID == answerID select item).FirstOrDefault();

        }


        public static void AddAnswer(Answer answer)
        {            
            EFContext.AddToAnswers(answer);
            EFContext.SaveChanges();
        }

    }
}
